<template>
    <div id="main" class="app-main">
        <router-view @showLoading="showLoading" @hideLoading="hideLoading"></router-view>

        <Spin size="large" fix v-if="spinShow"></Spin>

    </div>
</template>

<script>
    export default {
        data () {
            return {
                theme: this.$store.state.theme,
                spinShow: false
            };
        },
        mounted () {

        },
        beforeDestroy () {

        },
        methods: {
            hideLoading(){
                this.spinShow = false;
            },
            showLoading(){
                this.spinShow = true;
            }
        },
    };
</script>

<style>
    .app-main {
        width: 100%;
        height: 100%;
    }
</style>
